package cn.hackcloud.concurrency.observable;


import java.util.concurrent.TimeUnit;

public class ObservableTest {
    public static void main(String[] args) {
        Observable observable = new ObservableThread<>(() -> {
            try {
                TimeUnit.SECONDS.sleep(1);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            return "HELLO WORLD";
        });
        observable.start();
    }

}
